<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Example: Logger - Reading and Writing Basic Logs (YUI Library)</title>
<link type="text/css" rel="stylesheet" href="../../build/reset/reset.css">
<link type="text/css" rel="stylesheet" href="../../build/fonts/fonts.css">
<link type="text/css" rel="stylesheet" href="../../build/logger/assets/logger.css">
<link type="text/css" rel="stylesheet" href="./css/examples.css">
<link type="text/css" rel="stylesheet" href="../assets/dpSyntaxHighlighter.css" />
<style type="text/css">
#bd p {width:50%;}
</style>
</head>

<body>
<div id="hd">
    <h1><img src="./img/logo.gif" class="logo" alt="Y!"/><a href="./">Logger Widget</a> :: Reading and Writing Basic Logs</h1>
</div>

<div id="bd">
    <!-- Content begins -->
    <div id="intro">
        <h3>Default LogReader Example</h3>
        <p>With just a few lines of code, you can put a LogReader on any web
        page to display log messages written out via <code>YAHOO.log()</code>.
        By default, the LogReader will also look for the YUI Library's Drag and Drop
        utility to make the LogReader automatically draggable.</p>

        <p><a href="#" id="loglink">Click here</a> to log a simple message.</p>
    </div>

    <!-- Sample code begins -->
    <div id="code">
        <h3>Sample Code</h3>

        <textarea name="code" class="JScript" cols="60" rows="1">
// A single line of JavaScript can get you reading logs...
var myLogReader = new YAHOO.widget.LogReader();

// ...and writing logs
YAHOO.log("This is a simple log message.");
        </textarea>
    </div>
    <!-- Code sample ends -->
</div>
<!-- Libary begins -->
<script type="text/javascript" src="../../build/yahoo/yahoo.js"></script>
<script type="text/javascript" src="../../build/event/event.js"></script>
<script type="text/javascript" src="../../build/dom/dom.js"></script>
<script type="text/javascript" src="../../build/dragdrop/dragdrop.js"></script>
<script type="text/javascript" src="../../build/logger/logger.js"></script>
<!-- Library ends -->

<script type="text/javascript">
// Click the link to log a message
var clickHandler = function(e) {
    YAHOO.util.Event.stopEvent(e);
    YAHOO.log("This is a simple log message.");
};
YAHOO.util.Event.addListener(YAHOO.util.Dom.get("loglink"),"click",clickHandler);

// Put a LogReader on your page
var myLogReader = new YAHOO.widget.LogReader();
</script>

<script type="text/javascript" src="../assets/dpSyntaxHighlighter.js"></script>
<script type="text/javascript">
dp.SyntaxHighlighter.HighlightAll('code');
</script>

</body>
</html>
